package com.content.scaffold;

import cn.hutool.json.JSONObject;
import com.content.scaffold.plugins.spi.MessagePlugin;

import java.util.Iterator;
import java.util.ServiceLoader;

public class Main {
    public static void main(String[] args) {

            ServiceLoader<MessagePlugin> serviceLoader = ServiceLoader.load(MessagePlugin.class);
            Iterator<MessagePlugin> iterator = serviceLoader.iterator();
            JSONObject map = new JSONObject();
            while (iterator.hasNext()){
                MessagePlugin messagePlugin = iterator.next();
                messagePlugin.sendMsg(map);
            }


    }
}
